import request from '@/utils/request'

// 创建车源
export function createSeekVehicle(data) {
  return request({
    url: '/car/seek-vehicle/create',
    method: 'post',
    data: data
  })
}

// 更新车源
export function updateSeekVehicle(data) {
  return request({
    url: '/car/seek-vehicle/update',
    method: 'put',
    data: data
  })
}

// 删除车源
export function deleteSeekVehicle(id) {
  return request({
    url: '/car/seek-vehicle/delete?id=' + id,
    method: 'delete'
  })
}

// 获得车源
export function getSeekVehicle(id) {
  return request({
    url: '/car/seek-vehicle/get?id=' + id,
    method: 'get'
  })
}

// 获得车源分页
export function getSeekVehiclePage(query) {
  return request({
    url: '/car/seek-vehicle/page',
    method: 'get',
    params: query
  })
}

// 导出车源 Excel
export function exportSeekVehicleExcel(query) {
  return request({
    url: '/car/seek-vehicle/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
